import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import {TabBarComponent} from './tab-bar.component';

const routes: Routes = [
  { path: '', component: TabBarComponent,
    children: [
      { path: '', redirectTo: 'shop', pathMatch: 'full' },
      {path: 'shop', loadChildren: () => import('./components/shop/shop.module').then( m => m.ShopModule)},
      {path: 'shopcar', loadChildren: () => import('./components/shopcar/shopcar.module').then( m => m.ShopcarModule)},
      {path: 'mymsg', loadChildren: () => import('./components/mymsg/mymsg.module').then( m => m.MymsgModule)},
      ]
  }
];

@NgModule({
  imports: [RouterModule.forChild(routes)],
  exports: [RouterModule]
})
export class TabBarRoutingModule {}
